<include file="Public:head" />
<div class="col-xs-12">
    <div class="tabbable">
        <ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab">
            <li class="active"> <a href="#home">安装统计</a> </li>
        </ul>
        <blockquote class="layui-elem-quote layui-quote-nm">
        	<form action="{:U('install')}" method="post">
                <div class="layui-input-inline">
                    <input type="text" class="layui-input input-sm" lay-date="true" id="statime" <notempty name="statime">value="{$statime}"</notempty> name='statime' placeholder="开始日期" required />
                </div>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input input-sm" lay-date="true" id="endtime" <notempty name="endtime">value="{$endtime}"</notempty> name='endtime' placeholder="结束日期" required />
                </div>
                <div class="layui-input-inline">
                    <button type="submit" class="layui-btn layui-btn-small"> 查 询 </button>
                </div>
            </form>
            <div class="layui-input-inline">
                <form action="{:U('install')}" method="post">
                    <input type="hidden" name='time' value="1">
                    <button type="submit" class="layui-btn layui-btn-small <eq name='time' value='1'>layui-btn-normal<else/>layui-btn-primary</eq>">上 周</button>
                </form> 
                <form action="{:U('install')}" method="post">
                    <input type="hidden" name='time' value="2">
                    <button type="submit" class="layui-btn layui-btn-small <eq name='time' value='2'>layui-btn-normal<else/>layui-btn-primary</eq>">本 周</button>
                </form>
                <form action="{:U('install')}" method="post">
                    <input type="hidden" name='time' value="3">
                    <button type="submit" class="layui-btn layui-btn-small <eq name='time' value='3'>layui-btn-normal<else/>layui-btn-primary</eq>">上 月</button>
                </form> 
                <form action="{:U('install')}" method="post">
                    <input type="hidden" name='time' value="4">
                    <button type="submit" class="layui-btn layui-btn-small <eq name='time' value='4'>layui-btn-normal<else/>layui-btn-primary</eq>">本 月</button>
                </form> 
            </div>
        </blockquote>
        <div class="tab-content">
            <div id="container" style="width:100%;height:600px;margin:0 auto"></div>
            <div class="panel-footer ft clearfix">
                <div class="pull-left"></div>
                <div class="layui-laypage layui-laypage-default pull-right">
                    <a href="javascript:void(0);"> 总共下载<font style="color:red;"> {$data.count} </font>次</a>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 百度统计图插件 http://echarts.baidu.com/demo.html -->
<script type="text/javascript" src="__PUBLIC__/Public/lib/echarts/echarts.min.js"></script>
<!-- 统计图插件 -->
<script type="text/javascript">
	$(function(){

		var data = '{$list}';
		var jsondata = JSON.parse(data);
		var oBdata = eval(jsondata);

		var x = oBdata.date;
		var and = oBdata.list.AND;
		var ios = oBdata.list.IOS;
		
		var myChart = echarts.init(document.getElementById('container'));
        option = {
            title: {
                text: 'APP安装统计'
            },
            tooltip: {},
            legend: {
                data:['IOS','安卓']
            },
            xAxis: {
                data: x
            },
            yAxis: {},
            series: [{
                name: 'IOS',
                type: 'bar',
                data: ios
            }, {
                name: '安卓',
                type: 'bar',
                data: and
            }]
        };
        myChart.setOption(option);
		
	});
</script>
<include file="Public:foot" />